package com.alibaba.citrus.cr.sales.plan.facade.service.salesplan;

import com.alibaba.citrus.cr.sales.plan.api.salesplan.SalesPlanNykQueryService;
import com.alibaba.citrus.cr.sales.plan.dto.api.request.SalesPlanNykQueryRequest;
import com.alibaba.citrus.cr.sales.plan.repository.SalesPlanNykRepository;
import com.alibaba.citrus.cr.sales.plan.sdo.SalesPlanNykSDO;
import com.alibaba.cz.base.tool.page.PageResult;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SalesPlanNykQueryServiceImpl implements SalesPlanNykQueryService {

    @Resource
    private SalesPlanNykRepository salesPlanNykRepository;

    @Override
    public Result<PageResult<List<SalesPlanNykSDO>>> pageQueryProductPlanList(
        SalesPlanNykQueryRequest salesPlanNykQueryRequest) {
        PageResult<List<SalesPlanNykSDO>> listPageResult = salesPlanNykRepository.pageQuery(salesPlanNykQueryRequest);
        return Result.success(listPageResult);
    }
}
